'\" t
.\"     Title: gps2udp
.\"    Author: Fulup Ar Foll
.\" Generator: Asciidoctor 2.0.18
.\"      Date: 2023-01-10
.\"    Manual: GPSD Documentation
.\"    Source: GPSD Version 3.25
.\"  Language: English
.\"
.TH "GPS2UDP" "1" "2023-01-10" "GPSD Version 3.25" "GPSD Documentation"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
gps2udp \- feed the take from gpsd to one or more aggregation sites
.SH "SYNOPSIS"
.sp
\fBgps2udp\fP [OPTIONS] [server[:port[:device]]]
.sp
\fBgps2udp\fP \-h
.sp
\fBgps2udp\fP \-V
.SH "DESCRIPTION"
.sp
\fBgps2udp\fP is a tool to connect to \fBgpsd\fP and output the received sentences
to one or many UDP host:port destinations. This makes the program useful
for feeding AIS information from \fBgpsd\fP to aishub, marinetraffic,
shipfinder,...
.sp
\fBgps2udp\fP does not require root privileges, but can run as root.  It
can be run concurrently with other tools connecting to the local \fBgpsd\fP
without causing problems.
.sp
The output will consist of one or both of NMEA (\fB\-n\fP option) or JSON
(\fB\-j\fP option) \fBgpsd\fP sentences. The output is sent to one or many
destinations host through a UDP network socket (\fB\-u HOST:PORT\fP
options) .
.sp
Optionally a server, TCP/IP port number and remote device can be given.
If omitted, \fBgps2udp\fP connects to localhost on the default port (2947) and
watches all devices opened by \fBgpsd\fP.
.sp
\fBgps2udp\fP may be run as a daemon (\fB\-b\fP option).
.sp
\fBgps2udp\fP is designed to run smoothly in background; it reconnects
automatically to \fBgpsd\fP whenever it is restarted. For debugging purporses,
there is an option to exit gracefully after a given count of packets
(\fB\-c\fP option).
.SH "OPTIONS"
.sp
\fB\-?\fP, \fB\-h\fP, \fB\-\-help\fP
.RS 4
\-Print a usage message and exit.
.RE
.sp
\fB\-a\fP, \fB\-\-ais\fP
.RS 4
Send only AIS messages.
.RE
.sp
\fB\-b\fP, \fB\-\-daemon\fP
.RS 4
Causes \fBgps2udp\fP to run as a daemon.
.RE
.sp
\fB\-c COUNT\fP, \fB\-\-count COUNT\fP
.RS 4
Exit after COUNT sentences are sent.
.RE
.sp
\fB\-d LVL\fP, \fB\-\-debug LVL\fP
.RS 4
Set debug level to LVL. LVL = 0 prints nothing. LVL = 1 prints sent
packet on stdout. LVL = 2 prints ignored packets.
.RE
.sp
\fB\-j\fP, \fB\-\-json\fP
.RS 4
Causes JSON sentences to be output.
.RE
.sp
\fB\-n\fP, \fB\-\-nmea\fP
.RS 4
Causes NMEA sentences to be output.
.RE
.sp
\fB\-t\fP, \fB\-\-tpv\fP
.RS 4
Only output TPV sentences. Implies \-\-json.
.RE
.sp
\fB\-u HOST:PORT\fP, \fB\-\-udp HOST:PORT\fP
.RS 4
UDP destination for output sentenses (up to five destinations).
.RE
.sp
\fB\-v\fP, \fB\-V\fP, \fB\-\-version\fP
.RS 4
Prints the program version, then exit. \-v is deprecated December 2020.
.RE
.SH "ARGUMENTS"
.sp
By default, clients collect data from the local \fBgpsd\fP daemon running
on localhost, using the default GPSD port 2947. The optional argument
to any client may override this behavior: \fB[server[:port[:device]]]\fP
.sp
For further explanation, and examples, see the \fBARGUMENTS\fP section in
the \fBgps\fP(1) man page
.SH "EXAMPLES"
.sp
With a running \fBgpsd\fP accessible on the network this will collect data
from localhost:gpsd display them on stdout and send a copy to test
aishub in NMEA format.
.sp
.if n .RS 4
.nf
.fam C
gps2udp \-d 1 \-n \-u data.aishub.net:2222
.fam
.fi
.if n .RE
.sp
This will collect data from a remote \fBgpsd\fP located on fridu.net host,
will filter AIS messages and send them to 3 destinations (aishub,
marinetraffic, shipfinder) in NMEA format, while running in background
mode
.sp
.if n .RS 4
.nf
.fam C
gps2udp \-a \-n \-b \-u data.aishub.net:2222 \-u 5.9.207.224:5321 \(rs
   \-u 109.200.19.151:4001 fridu.net:2947
.fam
.fi
.if n .RE
.SH "RETURN VALUES"
.sp
\fB0\fP
.RS 4
on success.
.RE
.sp
\fB1\fP
.RS 4
on failure
.RE
.SH "SEE ALSO"
.sp
\fBgpsd\fP(8), \fBgps\fP(1)
.SH "RESOURCES"
.sp
\fBProject web site:\fP \c
.URL "https://gpsd.io/" "" ""
.SH "COPYING"
.sp
This file is Copyright 2013 by the GPSD project
.br
SPDX\-License\-Identifier: BSD\-2\-clause
.SH "AUTHOR"
.sp
Fulup Ar Foll